- if @metadata.developer_certs.present?
  .card.mb-3
    .card-header
      h3.card-title
        = t('teardowns.show.developer_certs_list', count: @metadata.developer_certs.size)
      .card-tools
        button.btn.btn-tool data-lte-toggle="card-collapse"
          i.fa-solid.fa-plus data-lte-icon="expand"
          i.fa-solid.fa-minus data-lte-icon="collapse"
    .card-body.certificates
      - @metadata.developer_certs.each_with_index do |certificate, i|
        .certificate
          - if certificate['version'].present?
            .certificate-title
              .fs-6.fw-bolder.flex-fill
                = "#{t('teardowns.show.cert', index: i + 1)} #{certificate['name']}"
              small.text-body-secondary.float-end
                = t('teardowns.show.cert_expired_at', date: l(Time.zone.parse(certificate['expired_at']), format: :nice))
            ul
              li
                span.key = t('teardowns.show.cert_serial')
                span.value = "#{certificate['serial']['number']} (#{certificate['serial']['hex']})"
              li
                span.key = t('teardowns.show.cert_version')
                span.value = certificate['version']
              li
                span.key = t('teardowns.show.cert_algorithem')
                span.value = certificate['algorithem']
              li
                span.key = t('teardowns.show.cert_digest')
                span.value = certificate['digest']
              - if certificate['length'].present?
                li
                  span.key = t('teardowns.show.cert_length')
                  span.value = certificate['length']
              li
                span.key = t('teardowns.show.cert_subject')
                span.value = certificate_name(certificate['subject'])
              li
                span.key = t('teardowns.show.cert_issuer')
                span.value = certificate_name(certificate['issuer'])
              li
                span.key = t('teardowns.show.cert_created')
                span.value = l(Time.zone.parse(certificate['created_at']), format: :nice)
              li
                span.key = t('teardowns.show.cert_expired')
                span.value = t('teardowns.show.cert_expired_at', date: l(Time.zone.parse(certificate['expired_at']), format: :nice))
              li
                span.key = t('teardowns.show.cert_fignger', digest: 'SHA-256')
                span.value = certificate['fingerprint']['sha256']
              li
                span.key = t('teardowns.show.cert_fignger', digest: 'SHA-1')
                span.value = certificate['fingerprint']['sha1']
              li
                span.key = t('teardowns.show.cert_fignger', digest: 'MD5')
                span.value = certificate['fingerprint']['md5']
          - else
            .certificate-title
              .fs-6.fw-bolder.flex-fill
                = t('teardowns.show.cert', index: i + 1)
              small.text-body-secondary.float-end
                = t('teardowns.show.cert_expired_at', date: l(Time.zone.parse(certificate['expired_at']), format: :nice))
            .py-2 = certificate['name']
